# 工具类
import logging,yagmail
class log():
    logging.basicConfig(filename='baidufirstpagewebtestlog.txt',level=logging.INFO,filemode='a+',format='%(filename)s->'
                                                                                                        ' %(levelname)s-> %(levelno)s-> %(asctime)s-> %(message)s')
class mail():
    mail=yagmail.SMTP(user='1508523002@qq.com',password='dhelwmusixdcgdbb',host='smtp.qq.com',port='465')
    mail.send(to='1508523002@qq.com',subject='百度WebFirstPage',contents='Ui自动化测试报告',attachments=['./html/index.html','baidufirstpagewebtestlog.txt'])